package com.digital.welcome.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.digital.welcome.entity.UserDorm;
import com.digital.welcome.mapper.UserDormMapper;
import com.digital.welcome.service.UserDormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserDormServiceImpl extends ServiceImpl<UserDormMapper, UserDorm> implements UserDormService {
    @Autowired
    private UserDormMapper userDormMapper;

    @Override
    public UserDorm selectDormIdByUserName(String userName) {
        return userDormMapper.selectDormIdByUserName(userName);
    }

    @Override
    public UserDorm selectUserIdByDormId(String dormId) {
        return userDormMapper.selectUserIdByDormId(dormId);
    }

    @Override
    public boolean insertUserDorm(String userName, String dormId) {
        return userDormMapper.insertUserDorm(userName, dormId);
    }
}
